home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / N-P / NIFTY / myCShell / Radius.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-17  |  2.1 KB  |  88 lines  |  [TEXT/KAHL]

  1. /*********************************************************
  2.  "Radius.c"
  3.  
  4.  by John A. Love, III [ Washington Apple Pi Users' Group]
  5.  
  6.  using Symantec's "THINK C", v 5.00
  7.  *********************************************************/
  8.  
  9.  
  10. #include "protos"
  11.  
  12. #include "globals.h"
  13. #include "extern.h"
  14.  
  15.  
  16.  
  17.  
  18. void InitBigScreen (RadiusData *RadStatus, short *fontSize)    {
  19.  
  20.         short    largeMenuBar = 5;        /* Bit # in CPFlags field for non-MacII. */
  21.         short    RadInfoID = 0;
  22.  
  23.         Handle    statusHdl, pivotHand, BIGfont;
  24.  
  25.  
  26.     SetResLoad(TRUE);
  27.  
  28.     pivotHand = GetNamedResource('INFO', "\pRadius Pivot Display");
  29.     if (pivotHand == nil)    LoadResource(pivotHand);
  30.     RadStatus->PivotHdl = (PivotDSHand)pivotHand;
  31.  
  32.     if (!gMac2)    statusHdl = GetNamedResource('INFO', "\pRadius Display");
  33.     else statusHdl = GetNamedResource('INFO', "\pRadius II Display");
  34.  
  35.     if (statusHdl == nil)
  36.     {
  37.         LoadResource(statusHdl);
  38.         if (statusHdl == nil)            /* Still !!! */
  39.         {
  40.             RadStatus->radType = none;
  41.             RadStatus->statHdl.zip = nil;
  42.             *fontSize = normalSize;
  43.             return;
  44.         }    /* STILL! */
  45.     }    /* Zip */
  46.  
  47.     if (!gMac2)
  48.     {
  49.         if (BitTst(&((*(RadBWStatHdl)(statusHdl))->CPFlags),(31-largeMenuBar)))
  50.         {
  51.             (*(RadBWStatHdl)(statusHdl))->LargeFontEn = (char)(1);
  52.             AddResource(statusHdl, 'INFO', RadInfoID, "\pRadius Display");
  53.             *fontSize = chicago16;
  54.             /* ID = 128 * font number + size: */
  55.             BIGfont = GetResource('FONT', 128 * systemFont + chicago16);
  56.             if (BIGfont == nil)    LoadResource(BIGfont);
  57.             (*(RadBWStatHdl)(statusHdl))->LargeFontEn = (char)(0);
  58.             (*(RadBWStatHdl)(statusHdl))->PluggedIn = (char)(0);
  59.             AddResource(statusHdl, 'INFO', RadInfoID, "\pRadius Display");
  60.         }
  61.         else    *fontSize = normalSize;
  62.         ;
  63.         RadStatus->radType = radBW;
  64.         RadStatus->statHdl.BWHdl = (RadBWStatHdl)statusHdl;
  65.     }
  66.  
  67.     else    /* gMac2 */
  68.  
  69.     {
  70.            if ((*(RadIIStatHdl)(statusHdl))->LargeMenus)
  71.         {
  72.             *fontSize = chicago16;
  73.             BIGfont = GetResource('FONT', 128 * systemFont + chicago16);
  74.             if (BIGfont == nil)    LoadResource(BIGfont);
  75.         }
  76.         else    *fontSize = normalSize;
  77.         ;
  78.         RadStatus->radType = radII;
  79.         RadStatus->statHdl.IIHdl = (RadIIStatHdl)statusHdl;
  80.     };    /* else gMac2 */
  81.  
  82. }    /* InitBigScreen */
  83.  
  84.  
  85.  
  86.  
  87. /*    { end file "Radius.c" }  */
  88.